﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ATM;
using NUnit.Framework;

namespace unit_test_atm
{
    [TestFixture]
    class CurrencyTranLogic_test
    {
        [Test]
        public void add_t_balnce_test()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.add_t_balnce("123");
            Assert.IsTrue(actual);
        }
        [Test]
        public void add_t_balnce_test_null()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.add_t_balnce(null);
            Assert.IsFalse(actual);
        }

        [Test]
        public void calculate_call_test()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.calculate_call("123", "1000");
            Assert.IsTrue(actual);
        }
        [Test]
        public void calculate_call_test_EmptyValue()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.calculate_call("", "1000");
            Assert.IsFalse(actual);
            bool actual2 = trans.calculate_call("123", "");
            Assert.IsFalse(actual2);
            bool actual3 = trans.calculate_call("", "");
            Assert.IsFalse(actual3);


        }

        [Test]
        public void calculate_from_call_test()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.calculate_from_call("123", "1000");
            Assert.IsTrue(actual);
        }
        [Test]
        public void calculate_from_call_test_EmptyValue()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.calculate_from_call("", "6578");
            Assert.IsFalse(actual);
            bool actual2 = trans.calculate_from_call("456", "");
            Assert.IsFalse(actual2);
            bool actual3 = trans.calculate_from_call("", "");
            Assert.IsFalse(actual3);


        }


        [Test]
        public void take_f_balnce_test()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.take_f_balnce("123", "1000");
            Assert.IsTrue(actual);
        }
        [Test]
        public void take_f_balnce_test_EmptyValue()
        {
            CurrencyTranLogic trans = new CurrencyTranLogic();
            bool actual = trans.take_f_balnce("433", "");
            Assert.IsFalse(actual);
            bool actual2 = trans.take_f_balnce("", "3445");
            Assert.IsFalse(actual2);
            bool actual3 = trans.take_f_balnce("", "");
            Assert.IsFalse(actual3);


        }

    }
}
